projects
/
project
/
mdnsd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
846369c
)
Fix IPv6 read
author
Cristian Morales Vega
<
[email protected]
>
Wed, 14 Dec 2016 16:49:38 +0000
(16:49 +0000)
committer
John Crispin
<
[email protected]
>
Mon, 19 Dec 2016 07:48:58 +0000
(08:48 +0100)
This is a quick fix. It may still not work when the interface has
multiple IPs, and this also applies to IPv4.
Signed-off-by: Cristian Morales Vega <
[email protected]
>
interface.c
patch
|
blob
|
history
diff --git
a/interface.c
b/interface.c
index c8d89721d05f15f6e248732f8b694be700f2f45f..4dfeace9de337916b662c608d1cedbab8953734f 100644
(file)
--- a/
interface.c
+++ b/
interface.c
@@
-306,7
+306,7
@@
read_socket6(struct uloop_fd *u, unsigned int events)
if (inp->ipi6_ifindex != iface->ifindex)
fprintf(stderr, "invalid iface index %d != %d\n", ifindex, iface->ifindex);
- else if (!interface_valid_src((void *) &iface->v
4_addr, (void *) &iface->v4
_netmask, (void *) &from.sin6_addr, 16))
+ else if (!interface_valid_src((void *) &iface->v
6_addr, (void *) &iface->v6
_netmask, (void *) &from.sin6_addr, 16))
dns_handle_packet(iface, (struct sockaddr *) &from, from.sin6_port, buffer, len);
}